import sys
from PyQt5.QtWidgets import QMainWindow,QApplication
from PyQt5.QtGui import QIcon
import Sign_In,Sign_Up,Select_win


class FirstMainWin(QMainWindow):
    def __init__(self,parent=None):
        super(FirstMainWin,self).__init__(parent)

        # 主窗口标题
        self.setWindowTitle('第一个主窗口应用')
        # 设置窗口尺寸
        self.resize(400,300)
        self.status = self.statusBar()
        self.status.showMessage('只存在5秒的消息',5000)

def jump_to_signUp():
    SignUp.show()
    Login.close()

def jump_to_signIn():
    Login.show()
    SignUp.close()

def jump_to_select():
    Select.show()
    Login.close()
    






if __name__ == '__main__':
    app = QApplication(sys.argv)

    # 登入界面
    Login = QMainWindow()
    ui_in = Sign_In.Ui_Dialog()
    ui_in.setupUi(Login)
    Login.show()

    # 注册界面
    SignUp = QMainWindow()
    ui_up = Sign_Up.Ui_Dialog()
    ui_up.setupUi(SignUp)


    # 选择界面
    Select = QMainWindow()
    ui_select = Select_win.Ui_MainWindow()
    ui_select.setupUi(Select)


    # 处理界面
    main = FirstMainWin()

    # 跳转界面
    ui_in.pushButton_2.clicked.connect(jump_to_signUp)
    ui_in.pushButton.clicked.connect(jump_to_select)  
    ui_up.pushButton.clicked.connect(jump_to_signIn) 









    sys.exit(app.exec_())